﻿namespace FSpec.Runner.Model

open FSpec.Runner
open Gallio.Common.Reflection 
open Gallio.Model

type FSpecAssembly(codeElement:ICodeElementInfo) as this =
    inherit Tree.Test(codeElement.Name, codeElement) with
        do
            codeElement |> insertXmlDocsInto this
            
            this.Kind <- "SpecificationDocument"
            
            ModelUtils.PopulateMetadataFromAssembly(ReflectionUtils.GetAssembly codeElement, this.Metadata)
            this.Metadata.SetValue(MetadataKeys.Framework, StringResources.FrameWorkName)
            this.Metadata.SetValue(MetadataKeys.File, (ReflectionUtils.GetAssembly codeElement).Path)
            this.Metadata.SetValue(MetadataKeys.Category, "Assemblies")

